package analysis;


/**
 * @author Mathieu Rousseau
 * @email mathieu.rousseau3@mail.mcgill.ca
 */


/** ------------------------------------------------------------------------------------------------------------------
 * start of StructureAnalyzerMain class
 * ------------------------------------------------------------------------------------------------------------------  **/
public class StructureAnalyzerMain{

	
	/*  start of main method  */
	public static void main(String[] args) {	
		
		//  parameters for the StructureAnalyzer program
		String filenameIFs, filenameFeatures, filenameStructure, filenameGenomicIndices;
		int diagonalSize, numberOfStructures;
		
		
		
		
		/** ------------------------------------------------------------------------------------------------------------------
		 * 
		 * 
		 * 								HARDCODING OF PARAMETERS
		 * 
		 * 
		 * ------------------------------------------------------------------------------------------------------------------  */
		
		
//		int chromosome = 14;
//		filenameIFs = "IFs_chr" + chromosome + ".txt";
//		filenameStructure = "chr" + chromosome + ".pdb";
//		filenameIFs = "IFs_chrX.txt";
//		filenameStructure = "chrX.pdb";
//		diagonalSize = 10;
		
		
//		filenameFeatures = "features_HoxA_genes.txt";
//		filenameFeatures = "features_3DFISH_midpoint.txt";
//		filenameFeatures = "features_3DFISH_start.txt";
//		filenameFeatures = "features_3DFISH_end.txt";
		filenameFeatures = "features_DNAseI.txt";
		
		
//		filenameGenomicIndices = "genomicPositionMap_DMSO.txt";
//		filenameGenomicIndices = "genomicPositionMap_PMA.txt";
		filenameGenomicIndices = "genomicPositionMap_chr14.txt";
//		filenameGenomicIndices = "genomicPositionMap_HB119.txt";
//		filenameGenomicIndices = "genomicPositionMap_NT2.txt";
		
		
//		filenameStructure = "DMSO.pdb";
//		filenameStructure = "PMA.pdb";
		filenameStructure = "chr14.pdb";
//		filenameStructure = "chr14_no_pool.pdb";
//		filenameStructure = "chr14_new.pdb";
//		filenameStructure = "2.pdb";
//		filenameStructure = "siCTCF.pdb";
		
		
		numberOfStructures = 0;
		
		
		
		/** ------------------------------------------------------------------------------------------------------------------
		 * 
		 * 
		 * 								END OF HARDCODING OF PARAMETERS
		 * 
		 * 
		 * ------------------------------------------------------------------------------------------------------------------  */
		
		
		//  StructureAnalyzer program object
		StructureAnalyzer analyzer = new StructureAnalyzer();
		
		
		
		
		/**		SINGLE STRUCTURE ANALYSIS		**/
//		analyzer.setFeaturesFromFile(filenameFeatures);
		
//		analyzer.setGenomicMappingFromFile(filenameGenomicIndices);
		
		analyzer.setStructureFromFile(filenameStructure);
		
		
//		analyzer.setIFsFromFile(filenameIFs);
//		analyzer.compactionProfile("compaction_profile_" + diagonalSize + "_" + filenameStructure.substring(0, filenameStructure.lastIndexOf('.')) + ".txt", diagonalSize);
//		analyzer.compactionProfile("compaction_profile_full_" + filenameStructure.substring(0, filenameStructure.lastIndexOf('.')) + ".txt", 0);
		
		
		
		
		//  output the coordinates of the features in the structure
//		analyzer.outputFeatureCoordinatesInStructure("coordinatesInStructure_" + filenameFeatures);
		
		
		
		
		//  calculate and output the pairwise distances between the features (as a list and as a heatmap)
//		analyzer.calculatePairwiseDistanceBetweenFeatures();
//		analyzer.outputPairwiseDistanceBetweenFeaturesAsList("pairwiseDistancesSingle_LIST_" + filenameFeatures);
//		analyzer.outputPairwiseDistanceBetweenFeaturesAsHeatmap("pairwiseDistances_HEATMAP_" + filenameFeatures);
		
		
		
		
		/**		STRUCTURE POOL ANALYSIS		**/
//		analyzer.calculatePoolAnalysisPairwiseDistanceBetweenFeatures(numberOfStructures);
//		analyzer.outputPoolAnalysisPairwiseDistanceBetweenFeatures(filenameFeatures);
		
		
		
		
		System.out.println("Done!");
	}/*  end of main method  */

	
}/*  end of StructureAnalyzerMain class  */
